<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>就业报名管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
	<script type="text/javascript"> //去除重复下列框
    $(function () {
        $("select").each(function (i, n) {
            var options = "";
            $(n).find("option").each(function (j, m) {
                if (options.indexOf($(m)[0].outerHTML) == -1) {
                    options += $(m)[0].outerHTML;
                }
            });
            $(n).html(options);
        });
    });
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/jobmesmanage/jobWork/">就业管理列表</a></li>
		<shiro:hasPermission name="jobmesmanage:jobWork:edit"><li><a href="${ctx}/jobmesmanage/jobWork/form">就业管理添加</a></li></shiro:hasPermission>
	</ul>
	<form:form id="searchForm" modelAttribute="jobWork" action="${ctx}/jobmesmanage/jobWork/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label>需求方名称：</label>
				<form:input path="jobName" htmlEscape="false" maxlength="30" class="input-medium"/>
			</li>
			<li><label>工资范围：</label>
				<form:input path="jobPay" htmlEscape="false" maxlength="64" class="input-medium"/>
			</li>
			<li><label>就业地点：</label>
				<form:input path="jobAddr" htmlEscape="false" maxlength="255" class="input-medium"/>
			</li>
			<li><label>业务名称：</label>
				<form:select path="linkId" class="input-medium">
					<form:option value="" label=""/>
					<form:options items="${jobworks}" itemLabel="jobStype" itemValue="linkId" htmlEscape="false"/>
				</form:select>
			</li>
			<li><label>联系电话：</label>
				<form:input path="jobPhone" htmlEscape="false" maxlength="11" class="input-medium"/>
			</li>
			<li><label>状态：</label>
				<form:select path="jobStates" class="input-medium">
					<form:option value="" label=""/>
					<form:options items="${fns:getDictList('req_status')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>业务名称</th>
				<th>需求方名称</th>
				<th>岗位内容</th>
				<th>就业要求</th>
				<th>工资范围</th>
				<th>提供服利说明</th>
				<th>就业地点</th>
				<th>联系电话</th>
				<th>状态</th>
				<shiro:hasPermission name="jobmesmanage:jobWork:edit"><th>操作</th></shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="jobWork">
			<tr>
				<td>
						${jobWork.jobStype}
				</td>
				<td><a href="${ctx}/jobmesmanage/jobWork/form?id=${jobWork.id}">
					${jobWork.jobName}
				</a></td>
				<td>
					${jobWork.jobContent}
				</td>
				<td>
					${jobWork.jobReq}
				</td>
				<td>
					${jobWork.jobPay}
				</td>
				<td>
					${jobWork.jobStatement}
				</td>
				<td>
					${jobWork.jobAddr}
				</td>
				<td>
					${jobWork.jobPhone}
				</td>
				<td>
					${fns:getDictLabel(jobWork.jobStates, 'req_status', jobWork.id)}
				</td>
				<shiro:hasPermission name="jobmesmanage:jobWork:edit"><td>
					<a href="${ctx}/jobmesmanage/jobWork/form?id=${jobWork.id}">修改</a>
					<a href="${ctx}/jobmesmanage/jobMesSearch/detail?joblinkid=${jobWork.id}">查看报名</a>
					<a href="${ctx}/jobmesmanage/jobWork/delete?id=${jobWork.id}" onclick="return confirmx('确认要删除该就业报名吗？', this.href)">删除</a>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>